import db from '../db/index.js'
export function getschool(req,res){
    const sql ='select schoolid,name,postion,type,motto,website from school'
    db.query(sql,(err,data)=>{
        if(err) return res.dbno(err)
            const school = data[0]
        const sql2='select honor ,create_time from shonor'
        db.query(sql2,(err,data)=>{
            if(err) return res.dbno(err)
                res.send({status:200,school,honor:data})
        })
    })
}